#include "character.h"

#include "database.h"

Character::Character()
{
  foreach(ed::Attribute a, ed::Attribute::values())
  {
    _attributes[a] = 5;
  }
}

Character::~Character()
{
}

void Character::setAttribute(ed::Attribute a, int value)
{
  if (value < 1) return;
  _attributes[a] = value;
}

int Character::attributeValue(ed::Attribute a) const
{
  return _attributes[a];
}

int Character::attributeLevel(ed::Attribute a) const
{
  return Database::level(attributeValue(a));
}
